import requests
from lxml import etree
import re
url = 'https://quotes.toscrape.com/page/1/'
res = requests.get(url)
tree = etree.HTML(res.text)
items = tree.xpath('//div[@class="quote"]')
for item in items:
    content = item.xpath('.//span[@class="text"]/text()')[0][1:-1]
    author = item.xpath('./span[2]/small/text()')[0]
    tag = item.xpath('./div[@class="tags"]')[0]
    pattern = r'<meta class="keywords" itemprop="keywords" content="(.*?)">'
    tags = re.findall(pattern,res.text,re.S)[:-3]
    print(content)
    print(author)
    print(tags)

